<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.29
     from pp.tnf on 19 December 2010 -->

<TITLE>Products and Parameters Reference - Testing a Generated Processor</TITLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#0000EE" VLINK="#551A8B" ALINK="#FF0000" BACKGROUND="gifs/bg.gif">
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0" VALIGN=BOTTOM>
<TR VALIGN=BOTTOM>
<TD WIDTH="160" VALIGN=BOTTOM>
<A HREF="http://eli-project.sourceforge.net/">
<IMG SRC="gifs/elilogo.gif" BORDER=0>
</A>&nbsp;
</TD>
<TD WIDTH="25" VALIGN=BOTTOM>
<img src="gifs/empty.gif" WIDTH=25 HEIGHT=25>
</TD>
<TD ALIGN=LEFT WIDTH="475" VALIGN=BOTTOM>
<A HREF="index.html"><IMG SRC="gifs/title.png" BORDER=0></A>
</TD>
<!-- |DELETE FOR SOURCEFORGE LOGO|
<TD>
<a href="http://sourceforge.net/projects/eli-project">
<img
  src="http://sflogo.sourceforge.net/sflogo.php?group_id=70447&amp;type=13"
  width="120" height="30"
  alt="Get Eli: Translator Construction Made Easy at SourceForge.net.
    Fast, secure and Free Open Source software downloads"/>
</a>
</TD>
|DELETE FOR SOURCEFORGE LOGO| -->
</TR>
</TABLE>

<HR size=1 noshade width=785 align=left>
<TABLE BORDER=0 CELLSPACING=2 CELLPADDING=0>
<TR>
<TD VALIGN=TOP WIDTH="160">
<h4>General Information</h4>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="index.html">Eli: Translator Construction Made Easy</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="gindex_1.html#SEC1">Global Index</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="faq_toc.html" >Frequently Asked Questions</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="ee.html" >Typical Eli Usage Errors</a> </td></tr>
</table>

<h4>Tutorials</h4>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="EliRefCard_toc.html">Quick Reference Card</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="novice_toc.html">Guide For new Eli Users</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="news_toc.html">Release Notes of Eli</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="nametutorial_toc.html">Tutorial on Name Analysis</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="typetutorial_toc.html">Tutorial on Type Analysis</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="ee.html" >Typical Eli Usage Errors</a> </td></tr>
</table>

<h4>Reference Manuals</h4>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="ui_toc.html">User Interface</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="pp_toc.html">Eli products and parameters</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="lidoref_toc.html">LIDO Reference Manual</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="ee.html" >Typical Eli Usage Errors</a> </td></tr>
</table>

<h4>Libraries</h4>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="lib_toc.html">Eli library routines</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="modlib_toc.html">Specification Module Library</a></td></tr>
</table>

<h4>Translation Tasks</h4>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="lex_toc.html">Lexical analysis specification</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="syntax_toc.html">Syntactic Analysis Manual</a></td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="comptrees_toc.html">Computation in Trees</a></td></tr>
</table>

<h4>Tools</h4>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="lcl_toc.html">LIGA Control Language</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="show_toc.html">Debugging Information for LIDO</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="gorto_toc.html">Graphical ORder TOol</a> </td></tr>
</table>
<p>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="fw_toc.html">FunnelWeb User's Manual</a> </td></tr>
</table>
<p>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="ptg_toc.html">Pattern-based Text Generator</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="deftbl_toc.html">Property Definition Language</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="oil_toc.html">Operator Identification Language</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="tp_toc.html">Tree Grammar Specification Language</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="clp_toc.html">Command Line Processing</a> </td></tr>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="cola_toc.html">COLA Options Reference Manual</a> </td></tr>
</table>
<p>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="idem_toc.html">Generating Unparsing Code</a> </td></tr>
</table>
<p>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="mon_toc.html">Monitoring a Processor's Execution</a> </td></tr>
</table>

<h4>Administration</h4>

<table BORDER=0 CELLSPACING=0 CELLPADDING=0>
<tr valign=top><td><img src="gifs/gelbekugel.gif" WIDTH=7 HEIGHT=7 ALT=" o"> </td><td><a href="sysadmin_toc.html">System Administration Guide</a> </td></tr>
</table>

<HR WIDTH="100%">
<A HREF="mailto:eli-project-users@lists.sourceforge.net">
<IMG SRC="gifs/button_mail.gif" BORDER=0 ALIGN="left"></A>
<A HREF="index.html"><IMG SRC="gifs/home.gif" BORDER=0 ALIGN="right"></A>

</TD>
<TD VALIGN=TOP WIDTH="25"><img src="gifs/empty.gif" WIDTH=25 HEIGHT=25></TD>

<TD VALIGN=TOP WIDTH="600">
<H1>Products and Parameters Reference</H1>
<P>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="pp_3.html"><IMG SRC="gifs/prev.gif" ALT="Previous Chapter" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="pp_5.html"><IMG SRC="gifs/next.gif" ALT="Next Chapter" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="pp_toc.html"><IMG SRC="gifs/up.gif" ALT="Table of Contents" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT="">
<HR size=1 noshade width=600 align=left>
<H1><A NAME="SEC29" HREF="pp_toc.html#SEC29">Testing a Generated Processor</A></H1>
<P>
After all of the inconsistencies detected by Eli have been removed from a set of
specifications, the generated processor must be run with typical input data
<A NAME="IDX84"></A>
to verify that the specifications actually describe the desired behavior.
Since improper processor behavior is always due to a specification error,
the specifications must be altered whenever such behavior occurs.
This means that a new processor must be generated and testing continued.
The products and parameters described in this section allow the user to remain
within the Eli system during this entire process.
<P>
<H2><A NAME="SEC30" HREF="pp_toc.html#SEC30">cmd -- Command Line to be Executed</A></H2>
<P>
<A NAME="IDX85"></A>
<PRE>
+cmd
</PRE>
<P>
A specification of a command line to be executed by the host machine.
This parameter is a list of the words of the command line.
Each word is specified by an odin-expression, and may be either a string or
a file.
Files are specified by parenthesized odin-expressions; strings are not
parenthesized:
<P>
<PRE>
+cmd=(sets.specs :exe)
+cmd=diff (result) (expected)
+cmd=sort -u
</PRE>
<P>
<H2><A NAME="SEC31" HREF="pp_toc.html#SEC31">stdout -- Standard Output from Processor Execution</A></H2>
<P>
<A NAME="IDX86"></A>
<PRE>
:stdout
</PRE>
<P>
A file containing the result of applying a filter to another file.
The filter is specified by the <CODE>+cmd</CODE> parameter attached to the
filtered file.
If no <CODE>+cmd</CODE> parameter is attached to the filtered file then the
result is simply the filtered file itself.
<P>
A typical situation is to use the generated processor to filter a data
file:
<P>
<PRE>
data +cmd=(sets.specs :exe) :stdout
</PRE>
<P>
<H2><A NAME="SEC32" HREF="pp_toc.html#SEC32">output -- Files Resulting from Processor Execution</A></H2>
<P>
<A NAME="IDX87"></A>
<PRE>
:output
</PRE>
<P>
The execution directory after applying a filter to a file.
The filter is specified by the <CODE>+cmd</CODE> parameter attached to the
filtered file.
If no <CODE>+cmd</CODE> parameter is attached to the filtered file then the
result will be an empty directory.
<P>
A typical situation is to use the generated processor to filter a data
file.
If the generated processor creates files as a side effect of processing the
data, these files will be in the derived directory:
<P>
<PRE>
data +cmd=(sets.specs :exe) :output
</PRE>
<P>
<H2><A NAME="SEC33" HREF="pp_toc.html#SEC33">run -- Execute the Processor in the Current Directory</A></H2>
<P>
<A NAME="IDX88"></A>
<PRE>
:run
</PRE>
<P>
Execution of a specified command line in a specified directory.
This derivation must be applied to a directory object, and requires a
<CODE>+cmd</CODE> parameter (see  <A HREF="pp_4.html#SEC30">cmd -- Command Line to be Executed</A>).
<P>
<PRE>
. +cmd=(sets.specs :exe) (input) :run
testdir +cmd=myprog -u (input (sets.specs :exe) :stdout) :run
</PRE>
<P>
Every request for <CODE>run</CODE> re-executes the command,
regardless of whether anything on which the execution depends has changed.
No other products can be derived from <CODE>run</CODE>.
In particular, it is not possible to obtain warning messages or error
reports by appending <CODE>:warning</CODE> or <CODE>:error</CODE> (see  <A HREF="pp_3.html#SEC24">warning -- Warning Messages and Error Reports</A>)
to this derivation.
If a warning message or error report is generated, Eli will specify
the derivation step for which warning or abort status was set.
The target of the derivation should be changed to this step,
followed by <CODE>:warning</CODE> or <CODE>:error</CODE>,
and the modified request submitted to Eli.
<P>
<H2><A NAME="SEC34" HREF="pp_toc.html#SEC34">Debugging -- Debug a Program Interactively at the Source Level</A></H2>
<P>
<A NAME="IDX89"></A>
<A NAME="IDX90"></A>
<A NAME="IDX91"></A>
<PRE>
:dbx
+core=( <VAR>file</VAR> ) :dbx
:gdb
+core=( <VAR>file</VAR> ) :gdb
</PRE>
<A NAME="IDX92"></A>
<A NAME="IDX93"></A>
<P>
<CODE>dbx</CODE> starts an interactive
<A NAME="IDX94"></A>
session with the source-level debugger
<A NAME="IDX95"></A>
of the machine on which Eli is running.
This session allows controlled execution
<A NAME="IDX96"></A>
of the generated processor.
Execution takes place in the current working directory, and
all of the source files of the generated compiler are made available.
<CODE>dbx</CODE> must be used with the <CODE>debug</CODE> parameter
(see  <A HREF="pp_4.html#SEC38">debug -- Request debugging information in object files</A>).
<P>
Alternatively, <CODE>gdb</CODE> can be used to use the GNU debugger
<A NAME="IDX97"></A>
<CODE>gdb</CODE>
<A NAME="IDX98"></A>
instead of <CODE>dbx</CODE>.
Both <CODE>dbx</CODE> and <CODE>gdb</CODE> check the environment variable
<CODE>ELI_DEBUGGER</CODE>.
<A NAME="IDX99"></A>
If <CODE>ELI_DEBUGGER</CODE> is set, then its value is taken as the name of the
debugger to be used.
The debugger whose name is the value of <CODE>ELI_DEBUGGER</CODE> must accept the
same parameters as either the Berkeley debugger dbx or the GNU debugger
gdb.
After setting <CODE>ELI_DEBUGGER</CODE>, use either <CODE>dbx</CODE> or <CODE>gdb</CODE> to
activate your program, depending upon which set of parameters is
appropriate.
<P>
An existing core file can be supplied by specifying the <CODE>core</CODE>
parameter.
<P>
Every request for <CODE>dbx</CODE> or <CODE>gdb</CODE> re-executes the generated processor,
regardless of whether anything on which the execution depends has changed.
No other products can be derived from <CODE>dbx</CODE> or <CODE>gdb</CODE>.
In particular, it is not possible to obtain warning messages or error
reports by appending <CODE>:warning</CODE> or <CODE>:error</CODE> (see  <A HREF="pp_3.html#SEC24">warning -- Warning Messages and Error Reports</A>)
to this derivation.
If a warning message or error report is generated, Eli will specify
the derivation step for which warning or abort status was set.
The target of the derivation should be changed to this step,
followed by <CODE>:warning</CODE> or <CODE>:error</CODE>,
and the modified request submitted to Eli.
<P>
<H2><A NAME="SEC35" HREF="pp_toc.html#SEC35">Monitoring -- Monitor a program at the specification level</A></H2>
<P>
<A NAME="IDX100"></A>
<PRE>
:mon
<A NAME="IDX101"></A>:mongdb
</PRE>
<A NAME="IDX102"></A>
<P>
<CODE>mon</CODE> starts an interactive session with the Noosa
<A NAME="IDX103"></A>
monitoring
<A NAME="IDX104"></A>
system (see  <A HREF="mon_toc.html">Monitoring Reference Manual</A>).  This session
allows execution monitoring
<A NAME="IDX105"></A>
of the generated processor at the level of the specifications used to
generate it.  This concentration on the specification level contrasts
with the use of debuggers to monitor the processor's execution in terms
of its source code (see  <A HREF="pp_4.html#SEC34">Debugging -- Debug a Program Interactively at the Source Level</A>).
<A NAME="IDX106"></A>
<P>
<CODE>mongdb</CODE> allows specification-level monitoring to be mixed with
source-level debugging using gdb
(see  <A HREF="pp_4.html#SEC34">Debugging -- Debug a Program Interactively at the Source Level</A>).  When using this mode of monitoring, the
source-level debugger has control of the executing program and runs as a
child of the monitoring system.  Consequently, the monitoring system is
inactive whenever the debugger is at its prompt level.
These derivations can be affected by the setting of the
<A NAME="IDX107"></A>
<CODE>ELI_DEBUGGER</CODE> environment variable.  If this variable is set, it
is assumed to be a gdb-compatible debugger.  Thus you can use other
debuggers that support the same command-line options.  For example,
graphical debuggers such as ddd can be used.
<P>
The <CODE>mon</CODE> and <CODE>mongdb</CODE> products imply the <CODE>monitor</CODE>
parameter (see  <A HREF="pp_4.html#SEC36">monitor -- Request monitoring support</A>) which causes the system to produce a
processor that includes the monitoring code.  The <CODE>arg</CODE> parameter
(see  <A HREF="pp_4.html#SEC37">arg -- Supply Command Line Parameters</A>) can be used to specify command-line arguments to the
program being monitored.
<P>
The following two derivations have the same effect:
<P>
<PRE>
sets.specs +monitor +arg=(input) :mon
sets.specs +arg=(input) :mon
</PRE>
<P>
<H2><A NAME="SEC36" HREF="pp_toc.html#SEC36">monitor -- Request monitoring support</A></H2>
<P>
<A NAME="IDX108"></A>
<PRE>
+monitor
</PRE>
<P>
If the <CODE>monitor</CODE> parameter is used, Eli includes monitoring support
in the generated processor.  Processors containing monitoring support
can be monitored at the specification level using the Noosa
<A NAME="IDX109"></A>
monitoring
<A NAME="IDX110"></A>
environment (see  <A HREF="mon_toc.html">Execution Monitoring Reference</A>) via the
<CODE>mon</CODE>,
<A NAME="IDX111"></A>
or <CODE>mongdb</CODE>
<A NAME="IDX112"></A>
products (see  <A HREF="pp_4.html#SEC35">Monitoring -- Monitor a program at the specification level</A>), which automatically imply the
<CODE>monitor</CODE> parameter.
For <CODE>mongdb</CODE> to be useful, the <CODE>debug</CODE> parameter must also be
used (see  <A HREF="pp_4.html#SEC38">debug -- Request debugging information in object files</A>).
<A NAME="IDX113"></A>
<P>
<H2><A NAME="SEC37" HREF="pp_toc.html#SEC37">arg -- Supply Command Line Parameters</A></H2>
<P>
<A NAME="IDX114"></A>
<PRE>
+arg='<VAR>item</VAR> &hellip;'
+arg=(<VAR>file</VAR>)
</PRE>
<P>
The specified items are supplied as command line parameters
<A NAME="IDX116"></A>
<A NAME="IDX115"></A>
to the generated processor when it is executed by <CODE>mon</CODE>
or <CODE>mongdb</CODE>.
An item is any sequence of non-white-space characters other than
apostrophes.
Items are separated by white space.
Any number of items may be specified.
<P>
<H2><A NAME="SEC38" HREF="pp_toc.html#SEC38">debug -- Request debugging information in object files</A></H2>
<P>
<A NAME="IDX117"></A>
<PRE>
+debug
</PRE>
<P>
If the <CODE>debug</CODE> parameter is used, all compilations are given the
<CODE>-g</CODE> flag.
<A NAME="IDX118"></A>
This causes the compilers to provide additional information for the
source-level debuggers <CODE>dbx(1)</CODE> and <CODE>gdb</CODE>.
See  <A HREF="pp_4.html#SEC34">Debugging -- Debug a Program Interactively at the Source Level</A>.  In conjunction with the <CODE>monitor</CODE> parameter
(see  <A HREF="pp_4.html#SEC36">monitor -- Request monitoring support</A>), <CODE>debug</CODE> enables the use of <CODE>mongdb</CODE>.
See  <A HREF="pp_4.html#SEC35">Monitoring -- Monitor a program at the specification level</A>.
<P>
<H2><A NAME="SEC39" HREF="pp_toc.html#SEC39">printtokens -- Request Token Printing Code</A></H2>
<P>
<A NAME="IDX119"></A>
<PRE>
+printtokens
</PRE>
<P>
If <CODE>printtokens</CODE> is specified, the generated processor will print the
source text coordinates,
<A NAME="IDX120"></A>
internal code
<A NAME="IDX121"></A>
and intrinsic value
<A NAME="IDX122"></A>
for each basic symbol
<A NAME="IDX123"></A>
as it is read.
This listing is useful to verify that the lexical analysis specification is
correct, and also to obtain a frequency distribution of the kinds of basic
symbols appearing in a program.
<P>
<HR size=1 noshade width=600 align=left>
<P>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="pp_3.html"><IMG SRC="gifs/prev.gif" ALT="Previous Chapter" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="pp_5.html"><IMG SRC="gifs/next.gif" ALT="Next Chapter" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT=""><A HREF="pp_toc.html"><IMG SRC="gifs/up.gif" ALT="Table of Contents" BORDER="0"></A>
<IMG SRC="gifs/empty.gif" WIDTH=25 HEIGHT=25 ALT="">
<HR size=1 noshade width=600 align=left>
</TD>
</TR>
</TABLE>

</BODY></HTML>
